//
//  TopImageCell.m
//  WXMovie
//
//  Created by mac106 on 16/4/5.
//  Copyright © 2016年 无限互联. All rights reserved.
//

#import "TopImageCell.h"

@implementation TopImageCell

- (void)setModel:(TopModel *)model {
    
    _model = model;
    self.titleLabel.text = _model.title;
    self.titleLabel.tintColor = [UIColor whiteColor];
    
    
    [self.imaView sd_setImageWithURL:[NSURL URLWithString:_model.images]];
    
    self.ratingLabel.text = [NSString stringWithFormat:@"%0.1f",_model.rating];
    self.ratingLabel.textAlignment = UITextAlignmentCenter;
    self.ratingLabel.textColor = [UIColor whiteColor];
    _star = [[StarViewCode alloc] initWithFrame:CGRectMake(0, 0, 80, 16)];
    //NSLog(@"%@",NSStringFromCGRect( _star.bounds));
    //_star.frame = _starView.bounds;
    // NSLog(@"%@",NSStringFromCGRect(_star.frame));
    [_starView addSubview:_star];
        
    [self.star changeStarViewWidthWithRating:_model.rating];
}



@end
